<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>地图显示</title>
</head>
<body>
<script>
    //收到后端给的经纬度信息
    //WebSocket
    var ws = new WebSocket("ws://localhost:80/websocket/location");
    //四种状态
    ws.onopen = function () {
        console.log("连接成功");
    };
    ws.onmessage = function (event) {
    }
    ws.onclose = function () {
        console.log("连接关闭");
    };
    ws.onerror = function () {
    }
</script>
</body>
</html>